/*
 * Copyright 2012 by Alison Leonard <alison@makerbot.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

#include "Compat.hh"
#include "Interface.hh"
#include <util/delay.h>
 
#include "UtilityScripts.hh"
#include <avr/pgmspace.h>
#include "EepromMap.hh"
#include "Model.hh"
#include "Menu_locales.hh"

const static uint16_t Lengths[3]  PROGMEM = { 98, /// Home Axes
					      LEVEL_PLATE_LEN,
#if defined(SINGLE_EXTRUDER) || !defined(NOZZLE_CALIBRATION_SCRIPT)
					      0};
#else
					      4639}; /// nozzle (toolhead) calibrate
#endif

#if !defined(SINGLE_EXTRUDER) && defined(NOZZLE_CALIBRATION_SCRIPT)
#ifdef MODEL_REPLICATOR2
const static uint8_t NozzleCalibrate[] PROGMEM = { 137,  8,  153,  0,  0,  0,  0,  82,  101,  112,  71,  32,  66,  117,  105,  108,  100,  0,  150,  0,  255,  134,  0,  136,  0,  31,  2,  110,  0,  136,  1,  31,  2,  110,  0,  134,  0,  136,  0,  3,  2,  220,  0,  134,  1,  136,  1,  3,  2,  220,  0,  132,  3,  105,  1,  0,  0,  20,  0,  131,  4,  136,  0,  0,  0,  20,  0,  140,  0,  0,  0,  0,  0,  0,  0,  0,  48,  248,  255,  255,  0,  0,  0,  0,  0,  0,  0,  0,  142,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  87,  41,  4,  0,  24,  131,  4,  220,  5,  0,  0,  20,  0,  144,  31,  139,  94,  215,  255,  255,  202,  228,  255,  255,  32,  78,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  128,  0,  0,  0,  145,  0,  20,  145,  1,  20,  145,  2,  20,  145,  3,  20,  145,  4,  20,  134,  0,  134,  0,  135,  0,  100,  0,  255,  255,  141,  0,  100,  0,  255,  255,  134,  1,  134,  1,  135,  1,  100,  0,  255,  255,  141,  0,  100,  0,  255,  255,  145,  0,  127,  145,  1,  127,  145,  2,  40,  145,  3,  127,  145,  4,  127,  134,  0,  142,  94,  215,  255,  255,  202,  228,  255,  255,  240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  213,  167,  38,  0,  24,  136,  0,  10,  1,  3,  136,  0,  4,  1,  255,  142,  93,  215,  255,  255,  201,  228,  255,  255,  240,  0,  0,  0,  166,  254,  255,  255,  0,  0,  0,  0,  0,  62,  73,  0,  24,  140,  94,  215,  255,  255,  202,  228,  255,  255,  240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  134,  0,  142,  66,  230,  255,  255,  183,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  11,  70,  16,  0,  24,  142,  67,  230,  255,  255,  184,  233,  255,  255,  104,  1,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  28,  88,  0,  0,  24,  137,  136,  142,  66,  230,  255,  255,  183,  233,  255,  255,  64,  0,  0,  0,  239,  255,  255,  255,  0,  0,  0,  0,  26,  143,  0,  0,  24,  142,  66,  230,  255,  255,  183,  233,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  141,  215,  255,  255,  183,  233,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  134,  47,  48,  0,  24,  142,  66,  230,  255,  255,  110,  237,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  188,  15,  0,  24,  142,  66,  230,  255,  255,  110,  237,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  110,  237,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  37,  241,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  67,  230,  255,  255,  36,  241,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  37,  241,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  220,  244,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  219,  244,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  220,  244,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  146,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  67,  230,  255,  255,  147,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  146,  248,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  59,  219,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  110,  7,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  109,  7,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  110,  7,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  67,  230,  255,  255,  36,  11,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  37,  11,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  36,  11,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  219,  14,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  220,  14,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  219,  14,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  67,  230,  255,  255,  146,  18,  0,  0,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  146,  18,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  146,  18,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  73,  22,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  73,  22,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  73,  22,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  192,  244,  255,  255,  165,  248,  255,  255,  104,  1,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  24,  147,  40,  0,  24,  142,  191,  244,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  213,  255,  255,  255,  0,  0,  0,  0,  211,  122,  0,  0,  24,  142,  191,  244,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  192,  244,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  134,  47,  48,  0,  24,  142,  118,  248,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  188,  15,  0,  24,  142,  118,  248,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  118,  248,  255,  255,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  45,  252,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  45,  252,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  45,  252,  255,  255,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  228,  255,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  227,  255,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  228,  255,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  155,  3,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  154,  3,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  155,  3,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  81,  7,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  82,  7,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  81,  7,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  8,  11,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  8,  11,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  9,  11,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  191,  14,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  191,  14,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  191,  14,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  117,  18,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  118,  18,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  118,  18,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  45,  22,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  44,  22,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  45,  22,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  227,  25,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  228,  25,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  227,  25,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  154,  29,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  155,  29,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  154,  29,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  81,  33,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  81,  33,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  81,  33,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  81,  33,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  146,  0,  0,  24,  137,  8,  134,  1,  137,  24,  140,  81,  33,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  22,  31,  0,  0,  0,  0,  0,  0,  142,  127,  243,  255,  255,  240,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  227,  132,  54,  0,  24,  142,  128,  243,  255,  255,  239,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  28,  88,  0,  0,  24,  137,  144,  142,  127,  243,  255,  255,  240,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  239,  255,  255,  255,  26,  143,  0,  0,  24,  142,  127,  243,  255,  255,  240,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  136,  254,  255,  255,  239,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  136,  254,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  75,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  74,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  135,  254,  255,  255,  74,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  128,  243,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  128,  243,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  128,  243,  255,  255,  83,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  83,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  82,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  128,  243,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  128,  243,  255,  255,  174,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  128,  243,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  135,  254,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  128,  243,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  135,  254,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  182,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  128,  243,  255,  255,  182,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  135,  254,  255,  255,  181,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  128,  243,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  135,  254,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  127,  243,  255,  255,  17,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  127,  243,  255,  255,  16,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  136,  254,  255,  255,  16,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  215,  1,  0,  0,  157,  237,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  83,  26,  42,  0,  24,  142,  214,  1,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  212,  255,  255,  255,  211,  122,  0,  0,  24,  142,  215,  1,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  215,  1,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  132,  5,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  132,  5,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  132,  5,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  49,  9,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  50,  9,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  49,  9,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  223,  12,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  223,  12,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  223,  12,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  140,  16,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  141,  16,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  140,  16,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  58,  20,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  57,  20,  0,  0,  158,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  58,  20,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  231,  23,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  231,  23,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  231,  23,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  149,  27,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  148,  27,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  149,  27,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  66,  31,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  65,  31,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  66,  31,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  240,  34,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  239,  34,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  239,  34,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  157,  38,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  156,  38,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  157,  38,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  74,  42,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  74,  42,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  74,  42,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  248,  45,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  247,  45,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  248,  45,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  137,  16,  142,  247,  45,  0,  0,  166,  248,  255,  255,  48,  242,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  160,  41,  121,  0,  24,  136,  1,  10,  1,  2,  136,  1,  4,  1,  255,  137,  31,  134,  0,  136,  0,  3,  2,  0,  0,  134,  1,  136,  1,  3,  2,  0,  0,  134,  0,  136,  0,  31,  2,  0,  0,  136,  1,  31,  2,  0,  0,  137,  31 };
#else
const static uint8_t NozzleCalibrate[] PROGMEM = { 137,  16,  153,  0,  0,  0,  0,  82,  101,  112,  71,  32,  66,  117,  105,  108,  100,  0,  150,  0,  255,  134,  0,  136,  0,  31,  2,  110,  0,  136,  1,  31,  2,  110,  0,  134,  0,  136,  0,  3,  2,  220,  0,  134,  1,  136,  1,  3,  2,  220,  0,  132,  3,  105,  1,  0,  0,  20,  0,  131,  4,  136,  0,  0,  0,  20,  0,  140,  0,  0,  0,  0,  0,  0,  0,  0,  48,  248,  255,  255,  0,  0,  0,  0,  0,  0,  0,  0,  142,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  87,  41,  4,  0,  24,  131,  4,  220,  5,  0,  0,  20,  0,  144,  31,  139,  94,  215,  255,  255,  202,  228,  255,  255,  32,  78,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  128,  0,  0,  0,  145,  0,  20,  145,  1,  20,  145,  2,  20,  145,  3,  20,  145,  4,  20,  134,  0,  134,  0,  135,  0,  100,  0,  255,  255,  141,  0,  100,  0,  255,  255,  134,  1,  134,  1,  135,  1,  100,  0,  255,  255,  141,  0,  100,  0,  255,  255,  145,  0,  127,  145,  1,  127,  145,  2,  40,  145,  3,  127,  145,  4,  127,  134,  0,  142,  93,  215,  255,  255,  201,  228,  255,  255,  240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  213,  167,  38,  0,  24,  136,  0,  10,  1,  3,  136,  0,  4,  1,  255,  142,  94,  215,  255,  255,  202,  228,  255,  255,  240,  0,  0,  0,  166,  254,  255,  255,  0,  0,  0,  0,  0,  62,  73,  0,  24,  140,  94,  215,  255,  255,  202,  228,  255,  255,  240,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  134,  0,  142,  66,  230,  255,  255,  183,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  11,  70,  16,  0,  24,  142,  66,  230,  255,  255,  183,  233,  255,  255,  104,  1,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  28,  88,  0,  0,  24,  137,  136,  142,  66,  230,  255,  255,  183,  233,  255,  255,  64,  0,  0,  0,  239,  255,  255,  255,  0,  0,  0,  0,  26,  143,  0,  0,  24,  142,  67,  230,  255,  255,  184,  233,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  140,  215,  255,  255,  183,  233,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  134,  47,  48,  0,  24,  142,  66,  230,  255,  255,  110,  237,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  188,  15,  0,  24,  142,  67,  230,  255,  255,  110,  237,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  109,  237,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  37,  241,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  37,  241,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  37,  241,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  219,  244,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  67,  230,  255,  255,  220,  244,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  219,  244,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  147,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  146,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  147,  248,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  67,  230,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  73,  252,  255,  255,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  59,  219,  255,  255,  183,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  109,  7,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  110,  7,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  242,  43,  0,  0,  24,  142,  58,  219,  255,  255,  109,  7,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  37,  11,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  36,  11,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  37,  11,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  67,  230,  255,  255,  219,  14,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  219,  14,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  219,  14,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  66,  230,  255,  255,  147,  18,  0,  0,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  146,  18,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  146,  18,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  67,  230,  255,  255,  73,  22,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  66,  230,  255,  255,  72,  22,  0,  0,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  58,  219,  255,  255,  73,  22,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  191,  244,  255,  255,  165,  248,  255,  255,  104,  1,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  24,  147,  40,  0,  24,  142,  192,  244,  255,  255,  166,  248,  255,  255,  64,  0,  0,  0,  213,  255,  255,  255,  0,  0,  0,  0,  211,  122,  0,  0,  24,  142,  191,  244,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  191,  244,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  134,  47,  48,  0,  24,  142,  118,  248,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  188,  15,  0,  24,  142,  118,  248,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  119,  248,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  45,  252,  255,  255,  166,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  44,  252,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  45,  252,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  228,  255,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  228,  255,  255,  255,  166,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  228,  255,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  154,  3,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  155,  3,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  154,  3,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  82,  7,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  81,  7,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  82,  7,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  8,  11,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  8,  11,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  8,  11,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  191,  14,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  191,  14,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  191,  14,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  118,  18,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  118,  18,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  118,  18,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  44,  22,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  45,  22,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  44,  22,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  228,  25,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  227,  25,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  228,  25,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  154,  29,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  44,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  154,  29,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  154,  29,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  82,  33,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  67,  19,  12,  0,  24,  142,  81,  33,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  230,  255,  255,  255,  0,  0,  0,  0,  241,  43,  0,  0,  24,  142,  81,  33,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  192,  254,  255,  255,  0,  0,  0,  0,  165,  35,  36,  0,  24,  142,  81,  33,  0,  0,  174,  3,  0,  0,  64,  0,  0,  0,  43,  0,  0,  0,  0,  0,  0,  0,  217,  146,  0,  0,  24,  137,  8,  134,  1,  137,  24,  140,  81,  33,  0,  0,  173,  3,  0,  0,  64,  0,  0,  0,  22,  31,  0,  0,  0,  0,  0,  0,  142,  195,  242,  255,  255,  239,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  125,  47,  55,  0,  24,  142,  195,  242,  255,  255,  240,  233,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  28,  88,  0,  0,  24,  137,  144,  142,  195,  242,  255,  255,  240,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  239,  255,  255,  255,  26,  143,  0,  0,  24,  142,  195,  242,  255,  255,  239,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  240,  233,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  74,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  75,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  74,  241,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  248,  244,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  83,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  82,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  83,  252,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  0,  0,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  174,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  203,  253,  255,  255,  173,  3,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  242,  43,  0,  0,  24,  142,  204,  253,  255,  255,  91,  7,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  8,  11,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  182,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  181,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  182,  14,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  99,  18,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  195,  242,  255,  255,  16,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  195,  242,  255,  255,  17,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  203,  253,  255,  255,  16,  22,  0,  0,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  26,  1,  0,  0,  157,  237,  255,  255,  104,  1,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  83,  26,  42,  0,  24,  142,  27,  1,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  212,  255,  255,  255,  211,  122,  0,  0,  24,  142,  26,  1,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  27,  1,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  199,  4,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  200,  4,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  200,  4,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  117,  8,  0,  0,  158,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  118,  8,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  117,  8,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  34,  12,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  35,  12,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  35,  12,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  208,  15,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  208,  15,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  208,  15,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  125,  19,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  125,  19,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  126,  19,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  43,  23,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  42,  23,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  43,  23,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  216,  26,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  217,  26,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  216,  26,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  133,  30,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  134,  30,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  134,  30,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  51,  34,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  51,  34,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  51,  34,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  224,  37,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  224,  37,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  230,  255,  255,  255,  241,  43,  0,  0,  24,  142,  225,  37,  0,  0,  166,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  184,  254,  255,  255,  165,  35,  36,  0,  24,  142,  142,  41,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  45,  0,  0,  0,  41,  16,  12,  0,  24,  142,  141,  41,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  142,  41,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  142,  59,  45,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  44,  0,  0,  0,  41,  16,  12,  0,  24,  142,  59,  45,  0,  0,  157,  237,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  229,  255,  255,  255,  241,  43,  0,  0,  24,  142,  60,  45,  0,  0,  165,  248,  255,  255,  64,  0,  0,  0,  0,  0,  0,  0,  185,  254,  255,  255,  165,  35,  36,  0,  24,  137,  16,  142,  59,  45,  0,  0,  165,  248,  255,  255,  48,  242,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  160,  41,  121,  0,  24,  136,  1,  10,  1,  2,  136,  1,  4,  1,  255,  137,  31,  134,  0,  136,  0,  3,  2,  0,  0,  134,  1,  136,  1,  3,  2,  0,  0,  134,  0,  136,  0,  31,  2,  0,  0,  136,  1,  31,  2,  0,  0,  137,  31 };
#endif
#endif // !defined(SINGLE_EXTRUDER) && defined(NOZZLE_CALIBRATION_SCRIPT)

LEVEL_PLATE

namespace utility {
	 
volatile bool is_playing;
int build_index = 0;
int build_length = 0;
const uint8_t * buildFile;
	  
/// returns true if script is running
bool isPlaying() {
	return is_playing;
}

void reset() {
	build_index = 0;
	build_length = 0;
	is_playing = false;
}
 
/// returns true if more bytes are available in the script
bool playbackHasNext() {
	return (build_index < build_length);
}
 
/// gets next byte in script
uint8_t playbackNext() {
	uint8_t byte;

	if ( build_index < build_length ) { 
		byte = pgm_read_byte(buildFile + build_index++);
		return byte;
	}
	else 
		return 0;
}
 
/// begin buffer playback
bool startPlayback(uint8_t build) {
	is_playing = true;
	build_index = 0;

	// get build file
	switch (build) {
	case HOME_AXES:  // we just used the first 98 bytes
	case LEVEL_PLATE_STARTUP:
		buildFile = LevelPlate;
		break;
#if !defined(SINGLE_EXTRUDER) && defined(NOZZLE_CALIBRATE_SCRIPT)
	case TOOLHEAD_CALIBRATE:
		buildFile = NozzleCalibrate;
		break;
#endif
	default:
		return false;
	}
	
	// get build length
	build_length = pgm_read_word(Lengths + build);

	return true;
}

/// updates state to finished playback
void finishPlayback() {
	is_playing = false;	
}

};

